/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package utiles;

import java.io.File;
import java.io.FilenameFilter;

/**
 *
 * @author S219
 */
public class FileNameCarteFilter implements FilenameFilter{
    
    /**
     * 
     * @param dir
     * @param name
     * @return vrai si le fichier correspond au filtre, faux sinon
     */
    @Override
    public boolean accept(File dir, String name) {
        File f = new File(dir, name);
        return f.isFile() && name.toLowerCase().endsWith(".xml");
    }
}
